package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsTitle string  `gorm:"type:varchar(30);not null;comment:商品标题;"`
	GoodsPrice float64 `gorm:"type:decimal(10,2);not null;comment:商品价格;"`
	GoodsNum   int     `gorm:"type:int(11);not null;comment:商品数量;"`
}

func (c *Goods) FindGoodsId(id int64) error {
	return Db.Where("id", id).First(&c).Error
}
